import request from '@/utils/request/request';
import type { LoginParams, LoginResponse } from '@/types/login';
import type { CommonResponse } from '@/types/response';

// 用户登录(账号+密码+验证码)
export const login = (params: LoginParams): Promise<CommonResponse<LoginResponse>> => 
  request.post('/login', params, { custom: { auth: false } });

// 用户退出
export const logout = (): Promise<CommonResponse<void>> => request.get('/logout');